f8207050ae96f2bca2e04e43af91e2c7ccff93b6,framework/minilang/src/org/ofbiz/minilang/method/callops/CallScript.java,CallScript,exec,#MethodContext#,67
Before Change
public boolean exec(MethodContext methodContext) throws MiniLangException {
String location = methodContext.expandString(this.location);
String method = methodContext.expandString(this.method);
List<Object> messages = errorListAcsr.get(methodContext);
if (messages == null) {
messages = FastList.newInstance();
errorListAcsr.put(methodContext, messages);
}
Map<String, Object> context = methodContext.getEnvMap();
if (location.endsWith(".xml")) {
try {
SimpleMethod.runSimpleMethod(location, method, methodContext);
After Change
public boolean exec(MethodContext methodContext) throws MiniLangException {
if (this.scriptlet != null) {
try {
this.scriptlet.executeScript(methodContext.getEnvMap());
} catch (Exception e) {
throw new MiniLangRuntimeException(e.getMessage(), this);
}
return true;
}
if (location.endsWith(".xml")) {
SimpleMethod.runSimpleMethod(location, method, methodContext);
} else {
ScriptUtil.executeScript(this.location, this.method, methodContext.getEnvMap());
}
return true;
}